import actions.ActionBuilder
import dsl.DSL
import dsl.actions.ActionStructure
import webdriver.groovydsl.WebDriverDsl

class Main {
    public static void main(String[] args) {
        DSL parser = new DSL(new FileReader("dslquery.txt"));
//        DSL parser = new DSL(System.in);
        List<ActionStructure> list = parser.initParser();
        println(list.size());
        def script = ActionBuilder.buildAction(list.get(0)).getResultScript()
        println script
        WebDriverDsl.run script
    }
}
